package com.baizhiedu.basic.autoDesignProcessors.beanFactoryPostProcessors;

import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;

/**
 * @Author songyahui
 * @Date 2023/8/9 11:58
 * @Description
 */
public class MyBeanDefinitionRegistryPostProcessor implements BeanFactoryPostProcessor, BeanDefinitionRegistryPostProcessor {

    public String way;

    public MyBeanDefinitionRegistryPostProcessor() {

    }

    public MyBeanDefinitionRegistryPostProcessor(String arg) {
        this.way = arg;
    }

    @Override
    public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
        System.out.println("俺这是MyRegistryPostProcessor.postProcessBeanDefinitionRegistry()(*≧ω≦)～" + way);
    }

    @Override
    public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
        System.out.println("俺这是MyRegistryPostProcessor.postProcessBeanFactory()( ´▽｀)～" + way);
    }
}
